#ifndef MUNJIZA_H
#define MUNJIZA_H

//#define MUNJIZA_MINATO

#ifdef MUNJIZA_MINATO

#include "detColisao.hpp"

class Munjiza : public DetecColisao
{
    public:
        Munjiza(){ Cell = NULL; Row = NULL; }
        Munjiza(REAL,REAL,REAL min_r[2],REAL max_r[2],ELEMENT_LIST<SPHERE>*,ForcaResultante*);
        ~Munjiza()
        {
            if (Cell != NULL) {
                for (long i = 0; i < MaxH; i++) delete [] Cell[i];
                delete [] Cell;
                delete [] Row;
            }
        }
        void calcular();
    private:
            void IniciaMatriz (REAL min_rad, REAL max_rad, REAL min_r[2], REAL max_r[2]);
            double CellSize;

            SPHERE** Row;
            SPHERE*** Cell;
            long MaxH;
};

#endif
#endif // MUNJIZA_H
